package com.eshore.norm.pojo.po;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author HJ
 * @date 2024/1/10 9:49
 */
@NoArgsConstructor
@Data
public class NormVolumeDetailPO {

    @JsonProperty("volumes")
    private List<VolumesDTO> volumes;

    @NoArgsConstructor
    @Data
    public static class VolumesDTO {
        @JsonProperty("os-vol-host-attr:host")
        private String host;
        @JsonProperty("attachments")
        private List<AttachmentsDTO> attachments;
        @JsonProperty("consistencygroup_id")
        private String consistencygroupId;
        @JsonProperty("created_at")
        private String createdAt;
        @JsonProperty("description")
        private String description;
        @JsonProperty("bootable")
        private Boolean bootable;
        @JsonProperty("updated_at")
        private String updatedAt;
        @JsonProperty("consumes_quota")
        private Boolean consumesQuota;
        @JsonProperty("links")
        private List<LinksDTO> links;
        @JsonProperty("id")
        private String id;
        @JsonProperty("multiattach")
        private Boolean multiattach;
        @JsonProperty("availability_zone")
        private String availabilityZone;
        @JsonProperty("cluster_name")
        private String clusterName;
        @JsonProperty("volume_type")
        private String volumeType;
        @JsonProperty("volume_type_id")
        private String volumeTypeId;
        @JsonProperty("count")
        private Integer count;
        @JsonProperty("migration_status")
        private String migrationStatus;
        @JsonProperty("volume_image_metadata")
        private VolumeImageMetadataDTO volumeImageMetadata;
        @JsonProperty("encrypted")
        private Boolean encrypted;
        @JsonProperty("size")
        private Integer size;
        @JsonProperty("group_id")
        private String groupId;
        @JsonProperty("user_id")
        private String userId;
        @JsonProperty("name")
        private String name;
        @JsonProperty("os-vol-tenant-attr:tenant_id")
        private String tenantId;
        @JsonProperty("replication_status")
        private String replicationStatus;
        @JsonProperty("status")
        private String status;



        @NoArgsConstructor
        @Data
        public static class VolumeImageMetadataDTO {
            @JsonProperty("img_signature_hash_method")
            private String imgSignatureHashMethod;
            @JsonProperty("__system_encrypted")
            private String systemEncrypted;
            @JsonProperty("min_disk")
            private String minDisk;
            @JsonProperty("__support_kvm_vgpu")
            private String supportKvmVgpu;
            @JsonProperty("container_format")
            private String containerFormat;
            @JsonProperty("img_signature_key_type")
            private String imgSignatureKeyType;
            @JsonProperty("__support_kvm_npu")
            private String supportKvmNpu;
            @JsonProperty("image_name")
            private String imageName;
            @JsonProperty("checksum")
            private String checksum;
            @JsonProperty("__isregistered")
            private String isregistered;
            @JsonProperty("__support_static_ip")
            private String supportStaticIp;
            @JsonProperty("file_format")
            private String fileFormat;
            @JsonProperty("min_ram")
            private String minRam;
            @JsonProperty("img_signature")
            private String imgSignature;
            @JsonProperty("architecture")
            private String architecture;
            @JsonProperty("__data_origin")
            private String dataOrigin;
            @JsonProperty("__virtual_size")
            private String virtualSize;
            @JsonProperty("hw_firmware_type")
            private String hwFirmwareType;
            @JsonProperty("__os_type")
            private String osType;
            @JsonProperty("__imagetype")
            private String imagetype;
            @JsonProperty("file_name")
            private String fileName;
            @JsonProperty("cloudinit")
            private String cloudinit;
            @JsonProperty("virtual_env_type")
            private String virtualEnvType;
            @JsonProperty("__support_kvm_gpu")
            private String supportKvmGpu;
            @JsonProperty("__support_kvm")
            private String supportKvm;
            @JsonProperty("__account_code")
            private String accountCode;
            @JsonProperty("__support_kvm_nvme_ssd")
            private String supportKvmNvmeSsd;
            @JsonProperty("hw_disk_bus")
            private String hwDiskBus;
            @JsonProperty("img_digest_value")
            private String imgDigestValue;
            @JsonProperty("__platform")
            private String platform;
            @JsonProperty("__support_kvm_hana")
            private String supportKvmHana;
            @JsonProperty("size")
            private String size;
            @JsonProperty("__os_version")
            private String osVersion;
            @JsonProperty("__os_bit")
            private String osBit;
            @JsonProperty("__admin_encrypted")
            private String adminEncrypted;
            @JsonProperty("disk_format")
            private String diskFormat;
            @JsonProperty("describe")
            private String describe;
            @JsonProperty("image_id")
            private String imageId;
        }

        @NoArgsConstructor
        @Data
        public static class AttachmentsDTO {
            @JsonProperty("volume_id")
            private String volumeId;
            @JsonProperty("attachment_id")
            private String attachmentId;
            @JsonProperty("id")
            private String id;
            @JsonProperty("attached_at")
            private String attachedAt;
            @JsonProperty("server_id")
            private String serverId;
            @JsonProperty("device")
            private String device;
            @JsonProperty("host_name")
            private String hostName;
        }

        @NoArgsConstructor
        @Data
        public static class LinksDTO {
            @JsonProperty("rel")
            private String rel;
            @JsonProperty("href")
            private String href;
        }
    }
}
